from django.contrib import admin
from gxxx.models import *


@admin.register(Gxxx06)
class Gxxx06Admin(admin.ModelAdmin):
    list_display = ['zybh', 'zymc', 'yxbh', 'lock', 'update_time']
    list_filter = ['yxbh', 'xs_0701_zym__sznj', 'xs_0701_zym__xsdqztm', 'source', 'priority', 'lock', 'create_time', 'update_time']
    search_fields = ['zybh', 'zymc', 'remarks']

    # raw_id_fields = ('yxbh', )

    ordering = ['-update_time']

    readonly_fields = ('create_time', 'update_time')

    fieldsets = (
        ('基本信息', {"fields": ["zybh", "zymc", 'yxbh', 'lx']}),
        ("其他信息", {
            "classes": ('collapse',),
            "fields": ['source', 'priority', 'lock', 'remarks', 'create_time', 'update_time']
        }),
    )


